package com.xxx.model;

import java.io.Serializable;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;

import com.xxx.common.utils.DateUtil;

import lombok.Data;

@Data
@SuppressWarnings("serial")
public class SysMenu implements Serializable{
	
	private Long id;
	
	@NotNull(message="排序编号不能为空")
    @Min(value=0,message="最小值为0")
	private int orderno;
	
	@NotNull(message="菜单名不能为空")
    @NotEmpty(message="菜单名不能为空")
	private String menuname;
	
	@NotNull(message="菜单链接不能为空")
    @NotEmpty(message="菜单链接不能为空")
	private String menuurl;
	
	@NotNull(message="上级菜单不能为空")
    @Min(value=9999,message="最小值为9999")
	private long parentid;
	
	private String icon;
	
	private int status = 1;
	
	private long createtime = DateUtil.dateToLong();
	
	private long updatetime = DateUtil.dateToLong();

	public SysMenu() {
		super();
	}

	public SysMenu(Long id, String menuname) {
		super();
		this.id = id;
		this.menuname = menuname;
	}
	
	
}
	

	
